package com.aiprompt.demos.template;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@NoArgsConstructor
@Data
public class Template {

    @JsonProperty("id")
    private String id;
    @JsonProperty("name")
    private String name;
    @JsonProperty("category")
    private String category;
    @JsonProperty("fields")
    private FieldsDTO fields;

    @NoArgsConstructor
    @Data
    public static class FieldsDTO {
        @JsonProperty("role")
        private String role;
        @JsonProperty("task")
        private String task;
        @JsonProperty("requirements")
        private RequirementsDTO requirements;
        @JsonProperty("output_format")
        private OutputFormatDTO outputFormat;
        @JsonProperty("optimization_tips")
        private List<String> optimizationTips;
        @JsonProperty("example")
        private ExampleDTO example;

        @NoArgsConstructor
        @Data
        public static class RequirementsDTO {
            @JsonProperty("target_audience")
            private String targetAudience;
            @JsonProperty("keywords")
            private String keywords;
            @JsonProperty("structure")
            private List<String> structure;
            @JsonProperty("meta_tags")
            private String metaTags;
        }

        @NoArgsConstructor
        @Data
        public static class OutputFormatDTO {
            @JsonProperty("structure")
            private String structure;
            @JsonProperty("style")
            private String style;
        }

        @NoArgsConstructor
        @Data
        public static class ExampleDTO {
            @JsonProperty("input")
            private String input;
            @JsonProperty("output")
            private String output;
        }
    }
}
